package four;

import java.util.Calendar;

public class Four {
	public static void main(String[] args) {
		Calendar date = Calendar.getInstance();
		int year = date.get(Calendar.YEAR);
		date.set(year, 0, 1);

		while (date.get(Calendar.YEAR) < year + 1) {
			if ((date.get(Calendar.DAY_OF_WEEK) - 1) == 0) {
				System.out.println(date.get(Calendar.DAY_OF_MONTH));
			}
			date.add(Calendar.DAY_OF_MONTH, 1);
		}
	}
}
